package com.jhh.pay.center.log;

import com.google.common.base.Strings;
import com.jhh.pay.center.search.IndexRouter;
import org.springframework.stereotype.Service;

/**
 * @author tangxd
 * @Description: TODO
 * @date 2017/12/4
 */
@Service("log_index_router")
public class LogIndexRouter implements IndexRouter<String> {
    @Override
    public String routing(String key) {
        if (Strings.isNullOrEmpty(key)) {
            return null;
        }
        //201710
        return key.substring(1, 6);
    }
}
